package samples.java.oom.heap;

import java.util.LinkedList;
import java.util.List;

/**
 * VM Args: -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * @author wang.yuchuan
 * @date 2018/9/28
 */
public class HeapOOMSamples {
    public static class OOMObject {

    }

    public static void main(String[] args) {
        List<OOMObject> lstObjs = new LinkedList<>();

        while (true) {
            lstObjs.add(new OOMObject());
        }
    }
}
